const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  publicPath: process.env.VUE_APP_PUBLIC_PATH,
  transpileDependencies: true,
  lintOnSave: false,
  css: {
    loaderOptions: {
      less: {
        // 若 less-loader 版本小于 6.0，请移除 lessOptions 这一级，直接配置选项。
        lessOptions: {
          modifyVars: {
            hack: `true; @import "@/styles/theme.less";`,
          },
        },
      },
    },
  },
  pluginOptions: {
    windicss: {
      config: {
        theme: {
          extend: {
            fontFamily: {
              pingfang: ["PingFangSC-Medium", "PingFang SC"],
            },
            colors: {},
          },
        },
      },
    },
  },
  devServer: {
    proxy: {
      "/api": {
        // target: "http://10.14.2.232:8080/",
        // target: "http://127.0.0.1:4523/mock/906669/",
        // target: "http://10.14.2.205:8080/zycrm", //胡强
        // target: "http://10.14.2.231:8080/zycrm", //杨杰
        // target: "http://10.14.2.195:8080/zycrm", //龚世杰
        // target: "http:// 10.14.2.184:8080/zycrm", //唐超
        // target: "http://10.14.2.49:8080/zycrm", // 杨文凯
        // target: "http://10.14.2.93:8080/zycrm", //柯慈宇
        target: "https://oasd.lianlianlvyou.com/zycrm",
        changeOrigin: true,
        pathRewrite: (path) => path.replace("/api", ""),
      },
    },
  },
});
